package com.wen.service;

import com.wen.dto.*;
import com.wen.pojo.Blog;

import java.util.List;
import java.util.Map;

public interface BlogService {
    List<BlogQuery> getAllBlogQuery();

    List<BlogQuery> getBlogBySearch(SearchBlog searchBlog);

    int saveBlog(Blog blog);

    ShowBlog getBlogById(Long id);

    int updateBlog(ShowBlog showBlog);

    int deleteBlog(Long id);

    List<FirstPageBlog> getAllFirstPageBlog();

    List<RecommendBlog> getRecommendedBlog();

    List<FirstPageBlog> getSearchBlog(String query);

    DetailedBlog getDetailedBlog(Long id);

    Integer countBlog();

    Map<String,List<Blog>> archiveBlog();

    //根据TypeId获取博客列表，在分类页进行的操作
    List<FirstPageBlog> getByTypeId(Long typeId);
    //根据TagId获取博客列表
    List<FirstPageBlog> getByTagId(Long tagId);

}
